package cn.xy.commons.validator;

import cn.hutool.core.lang.Validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * 手机号验证器
 *
 *  @author xy
 */
public class MobilePhoneValidator implements ConstraintValidator<MobilePhone, String> {
    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return Validator.isMobile(value);
    }
}
